package com.oig.sys.base.entity;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;


/**
 * @author wuxl
 */
@Getter
@Setter
@ToString
@Entity
@Table(name = "tb_country")
public class TbCountry implements Serializable {

	/**
	 * 国家代码3位, 如果是地区,前3位为国家代码
	 */
	@Id
	@Column(name = "code", nullable = false, length = 6)
	private String code;

	/**
	 */
	@Column(name = "name", length = 60)
	private String name;

	/**
	 */
	@Column(name = "en_name", length = 128)
	private String enName;

	/**
	 */
	@Column(name = "status")
	private String status;

	/**
	 * 地区的代码为，国家代码（3位）+ 代码去掉国家代码
	 */
	@Column(name = "iso_code", length = 10)
	private String isoCode;

	/**
	 * 组成 州为单个数字 ，海洋特殊 国家 第一位为州 再加上code，其他也一样
	 */
	@Column(name = "group_code", length = 10)
	private String groupCode;

	/**
	 */
	@Column(name = "short_code", length = 32)
	private String shortCode;

	/**
	 * 地区类型 0-洲 1-国家地区 2-城市
	 */
	@Column(name = "area_type")
	private String areaType;

	/**
	 * 虽然code和iso_code都能判断上下级，但是个人觉得还是加上parentcode方便查询
	 */
	@Column(name = "parent_code", length = 6)
	private String parentCode;

	@Column(name = "sub_index")
	private Integer subIndex;

	// 单证申请-国别地区映射
    @Column(name = "apply_code", length = 6)
    private String applyCode;
}
